<template>
  <div>
    <div v-for="shop in shops" :key="shop.name" class="shop-item">
      <img :src="shop.logo" alt="Shop Logo" class="shop-logo">
      <div class="shop-details">
        <h2>{{ shop.name }}</h2>
        <p>{{ shop.businessHours }}</p>
        <p>{{ shop.address }}</p>
      </div>
      <div class="shop-actions">
        <button @click="call(shop.phone)">Call</button>
        <button @click="navigate(shop.location)">Navigate</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      shops: [
        {
          name: '刘姐家常菜-308',
          businessHours: '周一至周日 09:00-21:00',
          address: '车城南路16号',
          phone: '1234567890',
          location: '车城南路16号',
          logo: 'path/to/logo1.png'
        },
        {
          name: '神仙居别院-308',
          businessHours: '营业时间：',
          address: '白塔镇上横街村',
          phone: '0987654321',
          location: '白塔镇上横街村',
          logo: 'path/to/logo2.png'
        },
        {
          name: '123 易货-308',
          businessHours: '周一至周日 08:00-18:30',
          address: '123',
          phone: '1122334455',
          location: '123',
          logo: 'path/to/logo3.png'
        }
      ]
    };
  },
  methods: {
    call(phone) {
      window.location.href = `tel: $ {phone}`;
    },
    navigate(location) {
      window.open(`https://www.google.com/maps?q= $ {location}`);
    }
  }
};
</script>

<style>
.shop-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.shop-logo {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

.shop-details {
  flex: 1;
}

.shop-actions button {
  margin-left: 10px;
}
</style>
